package com.service.acl.controller;

import com.service.acl.service.RolePermissionService;
import com.service.acl.service.UserRoleService;
import com.service.utils.ResultVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("userRole")
public class UserRoleController {

    @Autowired
    private UserRoleService userRoleService;

    @PostMapping("saveRole/{roleId}")
    @ApiOperation("给指定的管理员用户添加角色信息")
    public ResultVo saveRole(@PathVariable String userId, @RequestBody List<String> roleIds) {
        userRoleService.saveUser(userId,roleIds);
      return  ResultVo.ok();
    }

}
